package com.vn.gofriends.adapter;

import java.util.ArrayList;

import com.vn.gofriends.R;
import com.vn.gofriends.item.Trip;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class TotalMyTripAdapter extends BaseAdapter{

	Context context;
	ArrayList<Trip> trips;
	public TotalMyTripAdapter(Context context, ArrayList<Trip> trips){
		this.context = context;
		this.trips =trips;
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return trips.size();
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		View view = inflater.inflate(R.layout.item_layout_total_mytrip, arg2,false);
		TextView txtName = (TextView) view.findViewById(R.id.txtItemTotalName);
		txtName.setText(trips.get(arg0).getTitle());
		return view;
	}

}
